<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>完美解决placeholder的问题</title>
    </head>
    <body>
        <h2>完美解决placeholder的问题</h2>
        <p>来源：掘金<a href="https://juejin.im/post/59a3f2fe6fb9a0249471cbb4">https://juejin.im/post/59a3f2fe6fb9a0249471cbb4</a></p>
        <input type="text" placeholder="请输入用户名" />
        <input type="text" value="Name *" onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = 'Name *';}">
    </body>
</html>